package jmine.tec.web.front;

import bancosys.tec.exception.LocalizedMessageHolder;
import bancosys.tec.exception.MessageCreator;
import bancosys.tec.exception.MessageCreatorHelper;

/**
 * @author lundberg
 */
public enum FrontMessages implements MessageCreator {

    IO_EXCEPTION_SERIALIZING_FORM(0, "jmine.tec.web.front.io.exception.serializing.form"),

    IO_EXCEPTION_DESERIALIZING_FORM(0, "jmine.tec.web.front.io.exception.deserializing.form"),

    PARSE_EXCEPTION_DESERIALIZING_FORM(0, "jmine.tec.web.front.parse.exception.deserializing.form"),

    NO_HANDLER_FOUND_FOR_FORM(0, "jmine.tec.web.front.no.handler.found.for.form"),

    FORM_METADATA_NOT_FOUND(1, "jmine.tec.web.front.form.metadata.not.found"),

    REQUEST_PAGE_HELP_TEXT(0, "jmine.tec.web.front.pages.request.help.text"),

    REQUEST_VIEW_HELP_TEXT(0, "jmine.tec.web.front.pages.request.view.help.text"),

    FORM_REQUEST_PAGE(0, "jmine.tec.web.front.pages.request.form"),

    SYSTEM_IDENTIFIER_NOT_FOUND_FOR(1, "jmine.tec.web.front.domain.status.systemid.not.found"),

    REVISION_NOT_FOUND(0, "jmine.tec.web.front.domain.revision.not.found"),

    REQUEST_NOT_FOUND(0, "jmine.tec.web.front.domain.request.not.found"),

    REVISION_OUTCOME_NOT_SUPPORTED(0, "jmine.tec.web.front.domain.outcome.not.supported"),

    REVISION_PANEL_EXCEPTION(0, "jmine.tec.web.front.domain.revision.panel"),

    REQUEST_TYPE_NOT_FOUND(0, "jmine.tec.web.front.request.type.not.found"),

    SYSTEM_ID_NOT_REGISTERED_IN_WORKFLOW(1, "jmine.tec.web.front.workflow.systemid.not.registered"),

    TOO_MANY_BACKOFFICEREQUESTS_FOUND(2, "jmine.tec.web.front.dao.too.many.bors"),

    NO_BACKOFFICEREQUEST_FOUND_FOR_GIVEN_FORM_REFERENCE_VALUE(1, "jmine.tec.web.front.dao.no.bor.found");

    private final MessageCreator delegate;

    /**
     * Construtor
     * 
     * @param nargs nargs
     * @param key key
     */
    private FrontMessages(int nargs, String key) {
        this.delegate = MessageCreatorHelper.creator("jmine-tec-web-front-messages", key, nargs);
    }

    /**
     * {@inheritDoc}
     */
    public LocalizedMessageHolder create(Object... arguments) {
        return this.delegate.create(arguments);
    }

    /**
     * {@inheritDoc}
     */
    public int getExpectedArguments() {
        return this.delegate.getExpectedArguments();
    }

}
